#include "54func.h"
#include "clientFunc.h"

// 处理login指令的S返回值
int userLoginProc(int sockfd)
{
    char serverMsg[4096] = {0};
    recvn(sockfd,serverMsg,1);
    switch(serverMsg[0])
    {
    case 'o':break;
    case 'e': {
                  train_t train;
                  recvn(sockfd,&train.length,sizeof(train.length));
                  recvn(sockfd,train.data,train.length);
                  memcpy(serverMsg,train.data,train.length);
                  printf("Login:%s",serverMsg);
              }break;
    }
    return 0;
}
// 处理userAdd指令的S返回值
int userAddProc(int sockfd)
{
    printf("this is userAddProc\n");
    return 0;
}
// 处理logout指令的S返回值
int userLogoutProc(int sockfd)
{
    printf("this is userLogoutProc\n");
    return 0;
}

